#include <hxcpp.h>

#ifndef INCLUDED_Hash
#include <Hash.h>
#endif
#ifndef INCLUDED_Sys
#include <Sys.h>
#endif
#ifndef INCLUDED_cpp_CppInt32__
#include <cpp/CppInt32__.h>
#endif
#ifndef INCLUDED_cpp_vm_Gc
#include <cpp/vm/Gc.h>
#endif
#ifndef INCLUDED_haxe_Int64
#include <haxe/Int64.h>
#endif
#ifndef INCLUDED_haxe_Public
#include <haxe/Public.h>
#endif
#ifndef INCLUDED_jax_JVM
#include <jax/JVM.h>
#endif
#ifndef INCLUDED_jax_lang_JRuntime
#include <jax/lang/JRuntime.h>
#endif
namespace jax{
namespace lang{

Void JRuntime_obj::__construct()
{
{
}
;
	return null();
}

JRuntime_obj::~JRuntime_obj() { }

Dynamic JRuntime_obj::__CreateEmpty() { return  new JRuntime_obj; }
hx::ObjectPtr< JRuntime_obj > JRuntime_obj::__new()
{  hx::ObjectPtr< JRuntime_obj > result = new JRuntime_obj();
	result->__construct();
	return result;}

Dynamic JRuntime_obj::__Create(hx::DynamicArray inArgs)
{  hx::ObjectPtr< JRuntime_obj > result = new JRuntime_obj();
	result->__construct();
	return result;}

hx::Object *JRuntime_obj::__ToInterface(const type_info &inType) {
	if (inType==typeid( ::haxe::Public_obj)) return operator ::haxe::Public_obj *();
	return super::__ToInterface(inType);
}

::jax::lang::JRuntime JRuntime_obj::runtime;

Void JRuntime_obj::gc( ){
{
		HX_SOURCE_PUSH("JRuntime_obj::gc")
		HX_SOURCE_POS("Source/jax/lang/JRuntime.hx",12)
		::cpp::vm::Gc_obj::run(false);
	}
return null();
}


STATIC_HX_DEFINE_DYNAMIC_FUNC0(JRuntime_obj,gc,(void))

Void JRuntime_obj::exit( int code){
{
		HX_SOURCE_PUSH("JRuntime_obj::exit")
		HX_SOURCE_POS("Source/jax/lang/JRuntime.hx",16)
		::jax::JVM_obj::classes = ::Hash_obj::__new();
		HX_SOURCE_POS("Source/jax/lang/JRuntime.hx",17)
		::cpp::vm::Gc_obj::run(false);
		HX_SOURCE_POS("Source/jax/lang/JRuntime.hx",18)
		::jax::lang::JRuntime_obj::halt(code);
	}
return null();
}


STATIC_HX_DEFINE_DYNAMIC_FUNC1(JRuntime_obj,exit,(void))

Void JRuntime_obj::halt( int code){
{
		HX_SOURCE_PUSH("JRuntime_obj::halt")
		HX_SOURCE_POS("Source/jax/lang/JRuntime.hx",20)
		::Sys_obj::exit(code);
	}
return null();
}


STATIC_HX_DEFINE_DYNAMIC_FUNC1(JRuntime_obj,halt,(void))

int JRuntime_obj::availableProcessors( ){
	HX_SOURCE_PUSH("JRuntime_obj::availableProcessors")
	HX_SOURCE_POS("Source/jax/lang/JRuntime.hx",27)
	return (int)1;
}


STATIC_HX_DEFINE_DYNAMIC_FUNC0(JRuntime_obj,availableProcessors,return )

::haxe::Int64 JRuntime_obj::usedMemory( ){
	HX_SOURCE_PUSH("JRuntime_obj::usedMemory")
	HX_SOURCE_POS("Source/jax/lang/JRuntime.hx",30)
	return ::haxe::Int64_obj::__new(::cpp::CppInt32___obj::ofInt((int)0),::cpp::CppInt32___obj::ofInt((int)1));
}


STATIC_HX_DEFINE_DYNAMIC_FUNC0(JRuntime_obj,usedMemory,return )

::haxe::Int64 JRuntime_obj::maxMemory( ){
	HX_SOURCE_PUSH("JRuntime_obj::maxMemory")
	HX_SOURCE_POS("Source/jax/lang/JRuntime.hx",33)
	return ::haxe::Int64_obj::__new(::cpp::CppInt32___obj::ofInt((int)0),::cpp::CppInt32___obj::ofInt((int)999));
}


STATIC_HX_DEFINE_DYNAMIC_FUNC0(JRuntime_obj,maxMemory,return )

::haxe::Int64 JRuntime_obj::totalMemory( ){
	HX_SOURCE_PUSH("JRuntime_obj::totalMemory")
	HX_SOURCE_POS("Source/jax/lang/JRuntime.hx",36)
	return ::haxe::Int64_obj::__new(::cpp::CppInt32___obj::ofInt((int)0),::cpp::CppInt32___obj::ofInt((int)1000));
}


STATIC_HX_DEFINE_DYNAMIC_FUNC0(JRuntime_obj,totalMemory,return )


JRuntime_obj::JRuntime_obj()
{
}

void JRuntime_obj::__Mark(HX_MARK_PARAMS)
{
	HX_MARK_BEGIN_CLASS(JRuntime);
	HX_MARK_END_CLASS();
}

void JRuntime_obj::__Visit(HX_VISIT_PARAMS)
{
}

Dynamic JRuntime_obj::__Field(const ::String &inName,bool inCallProp)
{
	switch(inName.length) {
	case 2:
		if (HX_FIELD_EQ(inName,"gc") ) { return gc_dyn(); }
		break;
	case 4:
		if (HX_FIELD_EQ(inName,"exit") ) { return exit_dyn(); }
		if (HX_FIELD_EQ(inName,"halt") ) { return halt_dyn(); }
		break;
	case 7:
		if (HX_FIELD_EQ(inName,"runtime") ) { return runtime; }
		break;
	case 9:
		if (HX_FIELD_EQ(inName,"maxMemory") ) { return maxMemory_dyn(); }
		break;
	case 10:
		if (HX_FIELD_EQ(inName,"usedMemory") ) { return usedMemory_dyn(); }
		break;
	case 11:
		if (HX_FIELD_EQ(inName,"totalMemory") ) { return totalMemory_dyn(); }
		break;
	case 19:
		if (HX_FIELD_EQ(inName,"availableProcessors") ) { return availableProcessors_dyn(); }
	}
	return super::__Field(inName,inCallProp);
}

Dynamic JRuntime_obj::__SetField(const ::String &inName,const Dynamic &inValue,bool inCallProp)
{
	switch(inName.length) {
	case 7:
		if (HX_FIELD_EQ(inName,"runtime") ) { runtime=inValue.Cast< ::jax::lang::JRuntime >(); return inValue; }
	}
	return super::__SetField(inName,inValue,inCallProp);
}

void JRuntime_obj::__GetFields(Array< ::String> &outFields)
{
	super::__GetFields(outFields);
};

static ::String sStaticFields[] = {
	HX_CSTRING("runtime"),
	HX_CSTRING("gc"),
	HX_CSTRING("exit"),
	HX_CSTRING("halt"),
	HX_CSTRING("availableProcessors"),
	HX_CSTRING("usedMemory"),
	HX_CSTRING("maxMemory"),
	HX_CSTRING("totalMemory"),
	String(null()) };

static ::String sMemberFields[] = {
	String(null()) };

static void sMarkStatics(HX_MARK_PARAMS) {
	HX_MARK_MEMBER_NAME(JRuntime_obj::runtime,"runtime");
};

static void sVisitStatics(HX_VISIT_PARAMS) {
	HX_VISIT_MEMBER_NAME(JRuntime_obj::__mClass,"__mClass");
	HX_VISIT_MEMBER_NAME(JRuntime_obj::runtime,"runtime");
};

Class JRuntime_obj::__mClass;

void JRuntime_obj::__register()
{
	Static(__mClass) = hx::RegisterClass(HX_CSTRING("jax.lang.JRuntime"), hx::TCanCast< JRuntime_obj> ,sStaticFields,sMemberFields,
	&__CreateEmpty, &__Create,
	&super::__SGetClass(), 0, sMarkStatics, sVisitStatics);
}

void JRuntime_obj::__boot()
{
	hx::Static(runtime) = ::jax::lang::JRuntime_obj::__new();
}

} // end namespace jax
} // end namespace lang
